package com.itheima.system.pojo;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "t_device_manage", schema = "farm", catalog = "")
public class DeviceManage implements Serializable {
    @Id
    private Integer id;

    private Integer did;
    private Integer num;
    private String operation;
    private String install;
    private String location;

    @Id
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "did")
    public Integer getDid() {
        return did;
    }

    public void setDid(Integer did) {
        this.did = did;
    }

    @Basic
    @Column(name = "num")
    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Basic
    @Column(name = "operation")
    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    @Basic
    @Column(name = "install")
    public String getInstall() {
        return install;
    }

    public void setInstall(String install) {
        this.install = install;
    }

    @Basic
    @Column(name = "location")
    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeviceManage that = (DeviceManage) o;
        return id == that.id &&
                did == that.did &&
                Objects.equals(num, that.num) &&
                Objects.equals(operation, that.operation) &&
                Objects.equals(install, that.install) &&
                Objects.equals(location, that.location);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, did, num, operation, install, location);
    }

    public DeviceManage(Integer id, Integer did, Integer num, String operation, String install, String location) {
        this.id = id;
        this.did = did;
        this.num = num;
        this.operation = operation;
        this.install = install;
        this.location = location;
    }

    public DeviceManage() {
    }
}
